Release 10.1A: OpenEdge Development:
Progress 4GL Reference


– Subtraction operator

Subtracts one numeric expression from another numeric expression.

Syntax

expression - expression 

expression

An expression with a numeric value.

Example

This procedure determines the amount of inventory available by subtracting the amount allocated from the total on hand:

r-subt.p
DEFINE VARIABLE free-stock LIKE on-hand LABEL "Free Stock".

FOR EACH item:
  free-stock = on-hand - allocated.
  DISPLAY item-num item-name on-hand allocated free-stock.
END. 

Note

Subtracting one decimal expression from another produces a decimal value. Subtracting one integer expression from another produces an integer. Subtracting an integer expression from a decimal expression (or subtracting a decimal expression from an integer expression) produces a decimal value.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095